<template>
	<view>
		<uni-nav-bar @clickLeft='clickLeft()'	 left-icon="left" statusBar title="小金库" :border='false' color="#000" fixed backgroundColor='#ffffff00'>
		</uni-nav-bar>
		<image class="BGImage" :src="getImageUrl('/static/common/BG.png')" mode=""></image>
		<view class="" style="position: relative;z-index: 2;">
			<view class="view1">
				<view class="flex-row-space-between">
					<view class="title">
						小金库说明
					</view>
					<view class="button flex-row-center">
						去买金
					</view>
				</view>
				<view class="money">
					0
				</view>
				<view class="title1">
					Au9999库存重量
				</view>
				<view class="flex-row-space-between">
					<view class="button1 flex-row-center">
						去延结
					</view>
					<view class="button1 flex-row-center">
						去提金
					</view>
					<view class="button1 flex-row-center">
						去结算
					</view>
				</view>
				
			</view>
			<view class="view1">
				<u-tabs bold :current="tabsIndex" @click="tabClick" style="background-color: #FFFFFF00;" :list="tabsList"
					lineWidth="32" lineColor="#F54C0D" :activeStyle="{
											color: '#1A1A16',
											
											transform: 'scale(1)',
											fontWeight:'bold'
											
										}" :inactiveStyle="{
											color: '#535353',
											transform: 'scale(1)'
										}" itemStyle="  height: 44px;width:20%">
				</u-tabs>
				<u-empty>
				</u-empty>
			</view>

		</view>

	</view>
</template>

<script>
	import {
		mapActions,
		mapState
	} from "vuex";
	import {
		profile,
	} from '@/api/index.js'
	export default {
		components: {},
		computed: {

		},
		data() {
			return {
				tabsIndex: 0,
				tabsList: [{
						name: '全部',
						status: ""
					},
					{
						name: '入库',
						status: "0"
					},
				
					{
						name: '提金',
						status: "1"
					},
					{
						name: '结算',
						status: "2"
					},
					{
						name: '延结',
						status: "3"
					},
				],


			}
		},
		computed: {
			...mapState([
				'baseColor'
			]),
		},
		onPageScroll(e) {
			if (e.scrollTop > 20) {
				this.backgroundColor = "#AED0FC"
			} else {
				this.backgroundColor = "#ffffff00"
			}
		},
		onShow() {
			// this.userinfo=uni.getStorageSync('userinfo')
			// 			this.profile()
		},
		onLoad(e) {

			// this.loadData()
		},
		//下拉刷新
		onPullDownRefresh() {


		},
		//加载更多
		onReachBottom() {

		},
		onPageScroll(e) {
			// if (e.scrollTop > 20) {
			// 	this.backgroundColor = "#FBF9FF"
			// } else {
			// 	this.backgroundColor = "#ffffff00"
			// }
		},
		methods: {
			clickLeft(){
			uni.navigateBack()	
			},
			itemClick(item) {
				if (item.url) {
					this.toUrl(item.url)
				} else {
					this.showToast('请先实名')
				}
			},
			roleClick() {
				if (this.userinfo.group_id == 3 || this.userinfo.group_id == 0) {
					return
				}
				uni.navigateTo({
					url: '/pages/index/setRole'
				})
			},
			profile() {

				var data = {

				}
				profile(data).then(res => {

					uni.setStorageSync('userinfo', res.data)
					this.userinfo = uni.getStorageSync('userinfo')


				})
			},
			buttonClick() {
				uni.removeStorageSync('token')
				uni.navigateTo({
					url: '/pages/login/login'
				})
			},
			loadData() {

				var data = {
					id: this.id
				}
				forum_list(data).then(res => {
					this.list = res.data.data
				})
			},


		}
	}
</script>

<style lang="scss">
.view1{
	padding: 28rpx;
	margin: 28rpx;
	background: #FFFFFF;
	box-shadow: 0rpx 3rpx 6rpx 1rpx rgba(204,204,204,0.16);
	border-radius: 8rpx 8rpx 8rpx 8rpx;
}
.title{
	font-weight: 400;
	font-size: 26rpx;
	color: #171514;

}
.button{
	width: 142rpx;
	height: 54rpx;
	background: #FFF1EC;
	border-radius: 8rpx 8rpx 8rpx 8rpx;
	border: 1rpx solid #FFDACC;
	font-weight: 400;
	font-size: 26rpx;
	color: #F54C0D;
}
.money{
	margin-top: 40rpx;
	text-align: center;
	font-weight: 550;
	font-size: 106rpx;
	color: #FF0000;
}
.title1{
	margin-top: -10rpx;
	text-align: center;
	font-weight: 400;
	font-size: 26rpx;
	color: #171514;
}
.button1{
	margin-top: 20rpx;
	width: 199rpx;
	height: 64rpx;
	background: #F3F3F3;
	border-radius: 8rpx 8rpx 8rpx 8rpx;
	opacity: 0.99;
	font-weight: 400;
	font-size: 26rpx;
	color: #232120;
}
</style>